package fordemo;

public class fordemo4 {
    //打印正三角形和倒三角
    public static void main(String[] args) {
        //外循环控制行内循环控制列
        for (int i =0;i<=5;i++){
            for (int j =0; j<=i;j++){
                System.out.print(" * ");
            }
            System.out.println(" ");
        }
        System.out.println("-----分割--------");
        for (int i =0;i<=5;i++){
            for (int j =0; j<=5-i;j++){
                System.out.print(" * ");
            }
            System.out.println("  ");
        }
    }

}
